package com.kzd.btgame.db;

import android.database.Cursor;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;

import com.kzd.btgame.db.GameMember;import org.jetbrains.annotations.NotNull;

import java.util.List;

@Dao
public interface GameMemberDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    Long insert(@NotNull GameMember member);

    @Update(onConflict = OnConflictStrategy.REPLACE)
    void update(@NotNull GameMember member);

    @Delete
    void delete(@NotNull GameMember member);

    @Query("DELETE FROM GameMember")
    void delete();

    @Query("SELECT * FROM GameMember")
    Cursor loadAll();
}
